import { Router } from 'express';
import * as Controller from '../api/controllers/project.controller';

const router = Router();

router
  .route('/')
  .get(
    Controller.getProjects
  );

router
  .route('/projectid')
  .get(
    Controller.getProjectId
  );
router
    .route('/subject')
    .get(
        Controller.getSubjectProjectChecks
    )

router
  .route('/mid')
  .get(
    Controller.getMidProjectChecks
  )

router
  .route('/final')
  .get(
    Controller.getFinalProjectChecks
  )

router
  .route('/notification')
  .get(
    Controller.getNotifiedProjects
  );

router
  .route('/:id')
  .get(
    Controller.getProjectById
  );

router
  .route('/ownby/:projectOwnerId')
  .get(
    Controller.getProjectsByOwnerId
  );

router
  .route('/group/:projectGroupId')
  .get(
    Controller.GetProjectsByGroupId
  );

router
  .route('/my/:id')
  .get(
    Controller.getProjectsByUserId
);

router
  .route('/status/:projectStatus')
  .get(
    Controller.getProjectsByStatus
  );

router
  .route('/')
  .post(
    Controller.addProject
  );

router
  .route('/:id')
  .put(
    Controller.updateProjectById
  );

router
  .route('/approve/:id')
  .put(
    Controller.updateProjectApproveById
  );

router
  .route('/:id')
  .delete(
    Controller.deleteProjectById
  );

router
  .route('/upload')
  .post(
    Controller.upload
  );

export default router;